﻿using Newtonsoft.Json;
using Pay.Core;
using Pay.TO;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.DTO {
    /// <summary>
    /// 用户银行卡信息
    /// </summary>
    [Serializable]
    [JsonObject(MemberSerialization.OptOut)]
    public class merchant_bank_card_dto {
        /// <summary>
        /// 银行卡Id
        /// </summary>
        public long id { get; set; }

        /// <summary>
        /// 商户Id
        /// </summary>
        public long merchant_id { get; set; }

        /// <summary>
        /// 银行卡户名
        /// </summary>
        public string account_name { get; set; }

        /// <summary>
        /// 银行卡卡号
        /// </summary>
        public string account_num { get; set; }

        /// <summary>
        /// 银行名称
        /// </summary>
        public string bank_name { get; set; }

        /// <summary>
        /// 支行名称
        /// </summary>
        public string branch_name { get; set; }

        /// <summary>
        /// 手持身份证照
        /// [长度：300]
        /// </summary>
        public string hand_id_card_img { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public EMerchantBankCardStatus status { get; set; }

        /// <summary>
        /// 状态枚举描述
        /// </summary>
        public string status_title { get { return this.status.ToDescription(); } }

        /// <summary>
        /// 审核备注
        /// [长度：1000]
        /// </summary>
        public string remark { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime create_time { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime update_time { get; set; }

        /// <summary>
        /// 审核时间
        /// </summary>
        public DateTime? audit_time { get; set; }

        /// <summary>
        /// 审核人Id
        /// [长度：19]
        /// </summary>
        public long? audit_user_id { get; set; }

        /// <summary>
        /// 被邀请用户信息
        /// </summary>
        public virtual merchant_dto merchant { get; set; }

        /// <summary>
        /// 审核人
        /// </summary>
        public manage_dto audit_user { get; set; }
    }

    /// <summary>
    /// 用户银行卡信息
    /// </summary>
    [Serializable]
    [JsonObject(MemberSerialization.OptOut)]
    public class merchant_bank_card_dto_ex : merchant_bank_card_dto {
       
        /// <summary>
        /// 状态枚举下拉数据
        /// </summary>
        public List<DropdownItem> e_status_list {
            get { return typeof(EMerchantBankCardStatus).GetDropdownItemList(); }
        }
        /// <summary>
        /// 状态枚举值
        /// </summary>
        public string status_value { get; set; }
    }

        /// <summary>
        /// 用户银行卡信息
        /// </summary>
        [Serializable]
    [JsonObject(MemberSerialization.OptOut)]
    public class api_merchant_bank_card_dto {
        /// <summary>
        /// 银行卡Id
        /// </summary>
        public long id { get; set; }

        /// <summary>
        /// 商户Id
        /// </summary>
        public long merchant_id { get; set; }

        /// <summary>
        /// 银行卡户名
        /// </summary>
        public string account_name { get; set; }

        /// <summary>
        /// 银行卡卡号
        /// </summary>
        public string account_num { get; set; }

        /// <summary>
        /// 银行名称
        /// </summary>
        public string bank_name { get; set; }

        /// <summary>
        /// 支行名称
        /// </summary>
        public string branch_name { get; set; }

        /// <summary>
        /// 手持身份证照
        /// [长度：300]
        /// </summary>
        public string hand_id_card_img { get; set; }

        /// <summary>
        /// 状态（1：待审核，2：审核通过，3：审核通过，4：审核不通过）
        /// </summary>
        public EMerchantBankCardStatus status { get; set; }
    }


    public class edit_merchant_bank_card_dto {
        /// <summary>
        /// 银行卡Id
        /// </summary>
        [Required]
        public long id { get; set; }

        /// <summary>
        /// 银行卡户名
        /// </summary>
        [Required(ErrorMessage = "请填写银行卡户名")]
        public string account_name { get; set; }

        /// <summary>
        /// 银行卡卡号
        /// </summary>
        [Required(ErrorMessage = "请填写银行卡卡号")]
        public string account_num { get; set; }

        /// <summary>
        /// 银行中文名称（下拉列表text字段）
        /// </summary>
        [Required(ErrorMessage = "请填写银行名称")]
        public string bank_name { get; set; }

        /// <summary>
        /// 支行名称
        /// </summary>
        public string branch_name { get; set; }

        /// <summary>
        /// 手持身份证照
        /// [长度：300]
        /// </summary>
        public string hand_id_card_img { get; set; }
        /// <summary>
        /// 验证码
        /// </summary>
        [Required(ErrorMessage = "请填写验证码")]
        public string v_code { get; set; }

    }
}
